package com.example.demo.service;

import com.example.demo.entity.fin;
import com.example.demo.mapper.alreadyfinmapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class alreadyfinservice implements alreadyfinserviceInter {
    @Autowired
    alreadyfinmapper afdao;

    public PageInfo<fin> display(Integer pagenum, Integer pagesize) {
        PageHelper.startPage(pagenum, pagesize);
        List<fin> finlist = afdao.display();
        PageInfo<fin> pageinfo = new PageInfo<>(finlist);

        return pageinfo;
    }

    public List<fin> search(fin f) {
        return afdao.search(f);
    }
}
